package com.crm.common.model;

import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class DataResponse {

	private String code;

	private String message;

	private String errorDetail;

	private Object data;

	private Integer pageIndex;

	private Integer pageSize;

	private Long totalRecords;

	private Integer totalPages;


	public DataResponse() {
		super();
	}

	public DataResponse(String code, String message) {
		super();
		this.code = code;
		this.message = message;
	}

	public DataResponse(String code, String message, Object data) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}

	public DataResponse(String code, String message, String errorDetail, Object data) {
		super();
		this.code = code;
		this.message = message;
		this.errorDetail = errorDetail;
		this.data = data;
	}

	public DataResponse(String code, String message, Object data, Integer pageIndex, Integer pageSize, Long totalRecords,
                        Integer totalPages) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
		this.pageIndex = pageIndex;
		this.pageSize = pageSize;
		this.totalRecords = totalRecords;
		this.totalPages = totalPages;
	}

	public DataResponse(String code, String message, String errorDetail, Object data, Integer pageIndex, Integer pageSize,
                        Long totalRecords, Integer totalPages) {
		super();
		this.code = code;
		this.message = message;
		this.errorDetail = errorDetail;
		this.data = data;
		this.pageIndex = pageIndex;
		this.pageSize = pageSize;
		this.totalRecords = totalRecords;
		this.totalPages = totalPages;
	}

	public String getErrorDetail() {
		return errorDetail;
	}

	public void setErrorDetail(String errorDetail) {
		this.errorDetail = errorDetail;
	}

	public Integer getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(Integer totalPages) {
		this.totalPages = totalPages;
	}

	public Integer getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(Integer pageIndex) {
		this.pageIndex = pageIndex;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Long getTotalRecords() {
		return totalRecords;
	}

	public void setTotalRecords(Long totalRecords) {
		this.totalRecords = totalRecords;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
